package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FinanceWithdrawalsMapper;
import com.ruoyi.system.domain.FinanceWithdrawals;
import com.ruoyi.system.service.IFinanceWithdrawalsService;

/**
 * 提现订单管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-31
 */
@Service
public class FinanceWithdrawalsServiceImpl implements IFinanceWithdrawalsService 
{
    @Autowired
    private FinanceWithdrawalsMapper financeWithdrawalsMapper;

    /**
     * 查询提现订单管理
     * 
     * @param id 提现订单管理主键
     * @return 提现订单管理
     */
    @Override
    public FinanceWithdrawals selectFinanceWithdrawalsById(Long id)
    {
        return financeWithdrawalsMapper.selectFinanceWithdrawalsById(id);
    }

    /**
     * 查询提现订单管理列表
     * 
     * @param financeWithdrawals 提现订单管理
     * @return 提现订单管理
     */
    @Override
    public List<FinanceWithdrawals> selectFinanceWithdrawalsList(FinanceWithdrawals financeWithdrawals)
    {
        return financeWithdrawalsMapper.selectFinanceWithdrawalsList(financeWithdrawals);
    }

    /**
     * 新增提现订单管理
     * 
     * @param financeWithdrawals 提现订单管理
     * @return 结果
     */
    @Override
    public int insertFinanceWithdrawals(FinanceWithdrawals financeWithdrawals)
    {
        return financeWithdrawalsMapper.insertFinanceWithdrawals(financeWithdrawals);
    }

    /**
     * 修改提现订单管理
     * 
     * @param financeWithdrawals 提现订单管理
     * @return 结果
     */
    @Override
    public int updateFinanceWithdrawals(FinanceWithdrawals financeWithdrawals)
    {
        return financeWithdrawalsMapper.updateFinanceWithdrawals(financeWithdrawals);
    }

    /**
     * 批量删除提现订单管理
     * 
     * @param ids 需要删除的提现订单管理主键
     * @return 结果
     */
    @Override
    public int deleteFinanceWithdrawalsByIds(Long[] ids)
    {
        return financeWithdrawalsMapper.deleteFinanceWithdrawalsByIds(ids);
    }

    /**
     * 删除提现订单管理信息
     * 
     * @param id 提现订单管理主键
     * @return 结果
     */
    @Override
    public int deleteFinanceWithdrawalsById(Long id)
    {
        return financeWithdrawalsMapper.deleteFinanceWithdrawalsById(id);
    }

    @Override
    public void importFinanceMember(List<FinanceWithdrawals> financeMemberList) {
        for (FinanceWithdrawals financeMember : financeMemberList)
        {
            financeWithdrawalsMapper.insertFinanceWithdrawals(financeMember);
        }
    }
}
